package handler

import (
	"context"
	pb "emicro_test/emicro_2/grpc_server/user/pbfile"
	"emicro_test/emicro_2/grpc_server/user/common"
	"log"
)


type UserHandler struct {
	service *common.EmicroService
}

func (u *UserHandler) TestUser(ctx context.Context, req *pb.TestReq, resp *pb.TestResp) error {
	log.Println(req.Id)
	resp.Msg = "success"
	return nil
}

func NewUserHandler(service *common.EmicroService) *UserHandler{
	handler:= new(UserHandler)
	handler.service = service
	return handler
}
